global class DeleteNCDetailData implements Schedulable {
    global void execute(SchedulableContext sc) {
        // 出库单明细
        List<ExWarehouse_Detail__c> edList = [select Id from ExWarehouse_Detail__c where dr__c = true limit 9999];
        if (edList.size() > 0)Database.delete(edList,false);

        // 订单产品明细
        List<Order_Product__c> opList = [select Id from Order_Product__c where dr__c = true limit 9999];
        if (opList.size() > 0) Database.delete(opList,false);

        // 销售发票明细
        List<Sales_Invoice_Detail__c> sidList = [select Id from Sales_Invoice_Detail__c where dr__c = true limit 9999];
        if (sidList.size() > 0) Database.delete(sidList,false);

        // 产品
        List<Product__c> pList = [select Id from Product__c where dr__c = true limit 9999];
        if (pList.size() > 0) Database.delete(pList,false);
    }
}